<#include "../header.ftl">
<html>

<body>

<#include "../nav-top.ftl">
<input type="hidden" id="groupId" value="${group.groupId}"/>
<div class="sui-container" style="margin-top: 30px;">
    <ul class="sui-breadcrumb" style="padding: 0px 0px">
        <li><a href="#">账号群组管理</a></li>
        <li><a href="#">群组管理</a></li>
        <li class="active">群组详情</li>
    </ul>
    <form id="form-group" class="sui-form form-horizontal" novalidate="novalidate">
        <div class="sui-row-fluid">
            <div class="span12">
                <div class="control-group">
                    <label for="groupName">群组名称：</label>
                    <div class="controls">
                        <input type="text" value="${group.groupName}" id="groupName" name="groupName" placeholder="群组名称"
                               data-rules="required">
                    </div>
                    &nbsp;&nbsp;
                    <label for="groupLevel">群组级别：</label>
                    <div class="controls">
                    <#--<input type="text" id="inputEmail" name="email" placeholder="群组名称" data-rules="required">-->
                        <select class="input-large" id="groupLevel">
                        <#list groupLevel as level>
                            <#if group.groupLevel == level.codeValue>
                                <option value="${level.codeValue}" selected="selected">${level.codeName}</option>
                            </#if>
                            <#if group.groupLevel != level.codeValue>
                                <option value="${level.codeValue}">${level.codeName}</option>
                            </#if>
                        </#list>
                        </select>
                    </div>
                    &nbsp;&nbsp;
                    <label for="groupType">群组分类：</label>
                    <div class="controls">
                        <select class="input-large" id="groupType" disabled="disabled">
                        <#list groupType as type>
                            <#if group.groupType == type.codeValue>
                                <option value="${type.codeValue}" selected="selected">${type.codeName}</option>
                            </#if>
                            <#if group.groupType != type.codeValue>
                                <option value="${type.codeValue}">${type.codeName}</option>
                            </#if>

                        </#list>
                        </select>
                    </div>
                </div>
                <div class="control-group">
                    <label for="groupRemark">备　　注：</label>
                    <div class="controls">
                        <textarea rows="3" class="input-xxlarge " id="groupRemark"
                                  maxlength="100">${group.groupRemark}</textarea>
                    </div>
                </div>


            </div>
        </div>
        <div class="sui-row-fluid" style="margin-top: 20px;">
            <div class="span3">
            <#if editFlag == '1'>
                <button type="submit" class="sui-btn btn-xlarge btn-primary update-group " data-id="${group.groupId}">
                    确定
                </button>
            </#if>
                <a href="/group" class="sui-btn btn-xlarge btn-info">返回</a>
            </div>
        </div>
    </form>
</div>
<div class="sui-container grid-demo" style="margin-top: 30px;">
    <div class="sui-row-fluid">
        <div class="span12">
            <ul class="sui-nav nav-tabs nav-xlarge nav-primary">
                <li class="active"><a href="#channel" data-toggle="tab">渠道</a></li>
                <li><a href="#user" data-toggle="tab">账号</a></li>
            </ul>
            <div class="tab-content">
                <div id="channel" class="tab-pane active">
                    <div class="span1">
                        <ul class="sui-nav nav-list nav-large nav-user-type">
                            <li class="active" data-type="nav-channel-del"><a>已添加</a></li>
                            <li data-type="nav-channel-add"><a>可添加</a></li>
                        </ul>
                    </div>
                    <div class="span11 nav-channel-del nav-my-tabs">
                        <form id="form-channel-del" class="sui-form form-horizontal" novalidate="novalidate">
                            <div class="control-group">
                                <label for="channelId1">渠道ID：</label>
                                <div class="controls">
                                    <input type="text" id="channelId1" name="channelId1" placeholder="道ID"
                                           data-rules="required">
                                </div>
                                &nbsp;&nbsp;
                                <label for="channelName1">渠道名称：</label>
                                <div class="controls">
                                    <input type="text" id="channelName1" name="channelName1" placeholder="渠道名称"
                                           data-rules="required">
                                </div>
                                &nbsp;&nbsp;
                                <a href="javascript:void(0);" class="sui-btn btn-large query-channel-del">查询</a>&nbsp;
                            <#if editFlag == '1'>
                                <#if group.groupType == '2'>
                                    <button class="sui-btn btn-large del-channel" type="button">删除</button>
                                </#if>
                            </#if>
                            </div>
                        </form>
                        <table class="sui-table table-bordered rowover-table" id="tab-channel-del">
                            <thead>
                            <tr>
                                <th><input type="checkbox" class="check-del-channel"/></th>
                                <th>渠道ID</th>
                                <th>渠道名称</th>
                                <th>创建日期</th>
                                <th>平台类型</th>
                                <th>备注</th>
                            </tr>
                            </thead>
                            <tbody>

                            </tbody>
                        </table>
                        <div class="sui-pagination pagination-large channel-del-pagination" style="float: right">
                            <ul>
                                <li class="prev disabled"><a href="#">«上一页</a></li>
                                <li class="next"><a href="#">下一页»</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="span11 nav-channel-add nav-my-tabs" style="display: none">
                        <form id="form-channel-add" class="sui-form form-horizontal" novalidate="novalidate">
                            <div class="control-group">
                                <label for="channelId2">渠道ID：</label>
                                <div class="controls">
                                    <input type="text" id="channelId2" name="channelId2" placeholder="道ID"
                                           data-rules="required">
                                </div>
                                &nbsp;&nbsp;
                                <label for="channelName2">渠道名称：</label>
                                <div class="controls">
                                    <input type="text" id="channelName2" name="channelName2" placeholder="渠道名称"
                                           data-rules="required">
                                </div>
                                &nbsp;&nbsp;
                                <a href="javascript:void(0);" class="sui-btn btn-large query-channel-add">查询</a>&nbsp;
                            <#if editFlag == '1'>
                                <#if group.groupType == '2'>
                                    <button class="sui-btn btn-large add-channel" type="button">添加</button>
                                </#if>
                            </#if>
                            </div>
                        </form>
                        <table class="sui-table table-bordered rowover-table" id="tab-channel-add">
                            <thead>
                            <tr>
                                <th><input type="checkbox" class="check-add-channel"/></th>
                                <th>渠道ID</th>
                                <th>渠道名称</th>
                                <th>创建日期</th>
                                <th>平台类型</th>
                                <th>备注</th>
                            </tr>
                            </thead>
                            <tbody>

                            </tbody>
                        </table>
                        <div class="sui-pagination pagination-large channel-add-pagination" style="float: right">
                            <ul>
                                <li class="prev disabled"><a href="#">«上一页</a></li>
                                <li class="next"><a href="#">下一页»</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div id="user" class="tab-pane">
                    <div class="span1">
                        <ul class="sui-nav nav-list nav-large nav-user-type">
                            <li class="active" data-type="nav-user-del"><a>已添加</a></li>
                            <li data-type="nav-user-add"><a>可添加</a></li>
                        </ul>
                    </div>
                    <div class="span11 nav-user-del nav-my-tabs">
                        <form id="form-user-del" class="sui-form form-horizontal" novalidate="novalidate">
                            <div class="control-group">
                                <label for="accountName1">账号名称：</label>
                                <div class="controls">
                                    <input type="text" id="accountName1" name="accountName1" placeholder="账号名称"
                                           data-rules="required">
                                </div>
                                &nbsp;&nbsp;
                                <a href="javascript:void(0);" class="sui-btn btn-large query-user-del">查询</a>&nbsp;
                            <#if editFlag == '1'>
                                <#if group.groupType == '1'>
                                    <button type="button" class="sui-btn btn-large del-user">删除</button>
                                </#if>
                            </#if>

                            </div>
                        </form>
                        <table class="sui-table table-bordered  rowover-table" id="tab-user-del">
                            <thead>
                            <tr>
                                <th><input type="checkbox" class="check-del-user"/></th>
                                <th>账号名称</th>
                                <th>创建日期</th>
                                <th>备注</th>
                            </tr>
                            </thead>
                            <tbody>

                            </tbody>
                        </table>
                        <div class="sui-pagination pagination-large user-del-pagination" style="float: right">
                            <ul>
                                <li class="prev disabled"><a href="#">«上一页</a></li>
                                <li class="next"><a href="#">下一页»</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="span11 nav-user-add nav-my-tabs" style="display: none">
                        <form id="form-user-add" class="sui-form form-horizontal" novalidate="novalidate">
                            <div class="control-group">
                                <label for="accountName2">账号名称：</label>
                                <div class="controls">
                                    <input type="text" id="accountName2" name="accountName2" placeholder="账号名称"
                                           data-rules="required">
                                </div>
                                &nbsp;&nbsp;
                                <a href="javascript:void(0);" class="sui-btn btn-large query-user-add">查询</a>&nbsp;
                            <#if editFlag == '1'>
                                <#if group.groupType == '1'>
                                    <button type="button" class="sui-btn btn-large add-user">添加</button>
                                </#if>
                            </#if>

                            </div>
                        </form>
                        <table class="sui-table table-bordered  rowover-table" id="tab-user-add">
                            <thead>
                            <tr>
                                <th><input type="checkbox" class="check-add-user"/></th>
                                <th>账号名称</th>
                                <th>创建日期</th>
                                <th>备注</th>
                            </tr>
                            </thead>
                            <tbody>

                            </tbody>
                        </table>
                        <div class="sui-pagination pagination-large user-add-pagination" style="float: right">
                            <ul>
                                <li class="prev disabled"><a href="#">«上一页</a></li>
                                <li class="next"><a href="#">下一页»</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<#include "../footer.ftl">
<script src="../../static/js/plugins/sea/sea.js"></script>
<script src="../../static/js/sea.config.js"></script>
<script>
    seajs.use('/static/js/game/group/detail');
</script>
<script id="tp-user-add" type="text/html">
    <% for (var i = 0; i < list.length; i ++) {
    var user = list[i];
    %>
    <tr>
        <td><input type="checkbox" name="group-user-id-add" value="<%= user.uid %>"/></td>
        <td><%= user.accountName %></td>
        <td><%= dateFormat(user.createTime,'yyyy-MM-dd') %></td>
        <td><%= user.nickName %></td>

    </tr>
    <% } %>
</script>

<script id="tp-user-del" type="text/html">
    <% for (var i = 0; i < list.length; i ++) {
    var user = list[i];
    %>
    <tr>
        <td><input type="checkbox" name="group-user-id-del" value="<%= user.uid %>"/></td>
        <td><%= user.accountName %></td>
        <td><%= dateFormat(user.createTime,'yyyy-MM-dd') %></td>
        <td><%= user.nickName %></td>

    </tr>
    <% } %>
</script>

<script id="tp-channel-add" type="text/html">
    <% for (var i = 0; i < list.length; i ++) {
    var channel = list[i];
    %>
    <tr>
        <td><input type="checkbox" name="channel-id-add" value="<%= channel.channelId %>"/></td>
        <td><%= channel.channelId %></td>
        <td><%= channel.channelName %></td>
        <td><%= dateFormat(channel.createTime,'yyyy-MM-dd') %></td>
        <td><%= channel.plateformType %></td>
        <td><%= channel.channelRemark %></td>
    </tr>
    <% } %>
</script>

<script id="tp-channel-del" type="text/html">
    <% for (var i = 0; i < list.length; i ++) {
    var channel = list[i];
    %>
    <tr>
        <td><input type="checkbox" name="channel-id-del" value="<%= channel.channelId %>"/></td>
        <td><%= channel.channelId %></td>
        <td><%= channel.channelName %></td>
        <td><%= dateFormat(channel.createTime,'yyyy-MM-dd') %></td>
        <td><%= channel.plateformType %></td>
        <td><%= channel.channelRemark %></td>
    </tr>
    <% } %>
</script>
</body>
</html>
